/***********************************************************************
 * Module:  TypeINT.java
 * Author:  SilentSkyTA
 * Purpose: Defines the Class TypeINT
 ***********************************************************************/
package com.tuananh.radnom.model.thresholding;

import java.util.*;

import org.eclipse.persistence.oxm.annotations.XmlDiscriminatorValue;

/** @pdOid 008af7aa-73df-4ce7-a9cb-d3311f593618 */
public class TypeINT extends DataType {
	/**
	 * @param value1
	 * @param value2
	 * @pdOid d31d98f1-ff3e-4ddd-94d1-060f856f0d77
	 */
	public boolean isHigher(String value1, String value2) {
		// TODO: implement
		Integer convertedValue1 = (Integer) parse(value1), convertedValue2 = (Integer) parse(value2);
		if (convertedValue1 > convertedValue2)
			return true;
		else
			return false;
	}

	/**
	 * @param value1
	 * @param value2
	 * @pdOid a7cac35d-1257-4a81-9f4e-c55229c1371a
	 */
	public boolean isLower(String value1, String value2) {
		// TODO: implement
		Integer convertedValue1 = (Integer) parse(value1), convertedValue2 = (Integer) parse(value2);
		if (convertedValue1 < convertedValue2)
			return true;
		else
			return false;
	}

	/**
	 * @param value1
	 * @param value2
	 * @pdOid 6219c160-3694-4062-8190-4d91e9b885c8
	 */
	public boolean isEqual(String value1, String value2) {
		// TODO: implement
		Integer convertedValue1 = (Integer) parse(value1), convertedValue2 = (Integer) parse(value2);
		if (convertedValue1 == convertedValue2)
			return true;
		else
			return false;
	}

	/**
	 * @param value
	 * @pdOid edbd8655-981e-4b0d-aeac-552dae07debf
	 */
	public Object parse(String value) {
		// TODO: implement
		return Integer.parseInt(value);
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "int";
	}

}